﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using BlueLotus7.ArchiveSystem.IMStatusMonitor.Properties;
using System.Threading;

namespace BlueLotus7.ArchiveSystem.IMStatusMonitor
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
//#if DEBUG

//            StatusMonitorContainer container = null;
//            try
//            {
//                container = new StatusMonitorContainer(Settings.Default.ClientIdentity);
//            }
//            catch (Exception ex)
//            {
//                Global.Logger.LogException("Fail to initialize monitor container: " + Settings.Default.ClientIdentity.ToString(), ex);
//            }

//            if (container != null)
//            {
//                container.Start();
//            }

//            while (true)
//            {
//                Thread.Sleep(1000);
//            }
//#else
            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[] 
			{ 
				new IMStatusMonitorService() 
			};
            ServiceBase.Run(ServicesToRun);
//#endif
        }
    }
}
